﻿<%@ include file="../include/top.jsp"%>
<%@ include file="../include/errorArea.jsp" %>
<link rel="stylesheet" href="${baseURL}/css/zTreeStyle/zTreeStyle.css" type="text/css">
<script language="javascript" type="text/javascript" src="${baseURL}/js/jquery.ztree.all-3.5.min.js">
</script>
<script src="${baseURL}/shop/js/calendar.js"></script>

<SCRIPT type="text/javascript">

	function clickSS(){
		document.getElementById("Image8").click(); 
		$("#Image8").click();
	}
</SCRIPT>

  <form action="" method="get" name="searchForm" id="searchForm">
    <input type="hidden" name="p" value="1" />
<div class='adduser'>
	<div class='adduser-left'><div class='adduser-icon'></div><span>配货管理</span></div>
</div>

<div class='querycondition'>
	<div class='condtiontitle'><div class='searchcondition'></div>搜索条件：</div>
	<div class='condtion'>
		
		订单日期：
                <input id="startTime" name="startTime" onclick="calendar.show(this);" value="${formdata.startTime}" type="text" class="sell-textinput-02">
	
	</div>
</div>
<div class='querycondition'>
	<div class='condtion'>
  		
		<input name="image" type="image" style="display:none" id="Image8" onmouseover="MM_swapImage('Image8','','${baseURL}/images/button_ss_a.jpg',1)" onmouseout="MM_swapImgRestore()" src="${baseURL}/images/button_ss.jpg"/>
	     &nbsp;&nbsp;&nbsp;&nbsp;
	     <%-- <img src="${baseURL}/images/button_qk.jpg" name="clearButton" id="clearButton" style="cursor:pointer" onclick="clearInput()" onmouseover="MM_swapImage('clearButton','','${baseURL}/images/button_qk_a.jpg',1)" onmouseout="MM_swapImgRestore()"/> --%>
	  <input type='button' value='搜索'  class='button cyan medium' onclick="clickSS();">&nbsp;&nbsp;
	</div>
</div>


  </form>
<script>
$("#supplierId").val("${formdata.supplierId}");

function selectAll(checkAllFlag) {
	var checkArray = document.getElementsByName("chk");
	for (var i = 0; i < checkArray.length; i++) {
		checkArray[i].checked = checkAllFlag;
	}
}
</script>

<c:if test="${empty communityList}">
<div align="center"><b>没有符合条件的记录。</b></div>
</c:if>
<c:if test="${not empty communityList}">
<div class='userlist-title'>
	<div class='userlist-title-left'><div class='userlist-title-icon'></div><span>配货清单</span></div>
</div>
<div class='userlist'>
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#FFFFFF" id="listTable">
	<tr align="center" bgcolor="#eeeeee">
		<td class='userlist-td operation' height="25" width="5%"><input type="checkbox" onclick="selectAll(this.checked);"></td>
		<td class='userlist-td operation' width="20%">配货单</td>		
	</tr>
	<c:forEach var="row" items="${communityList}"> 
		<tr>
		<td class='userlist-td operation'><input name="chk" type="checkbox" id="chk" value="${row.id}" /></td>
			<td class='userlist-td'>
			<a onclick="preShowReady(${row.id},'${row.communityName}');" href="#" class="ctrlLink">${row.communityName}${formdata.startTime}配货清单</a>
		    </td>
		</tr> 
    </c:forEach>
        <!-- </table> -->
        <!-- </td>
      </tr>
    </table></td>
  </tr> -->
</table>
</div>
</c:if>
<script type="text/javascript">
function preShowReady(communityId,communityName){
	
	//开始时间
	var startTime = document.getElementById("startTime").value;
	$.layer({
	    type: 2,
	    maxmin: true,
	    shadeClose: true,
	    title: '社区名称：'+communityName+'时间:'+startTime,
	    shade: [0.1,'#fff'],
	    offset: [($(window).height() / 10)+'px',''],
	    area: ['600px', '400px'],
	    iframe: {src: '${ctx}/supplierProduct/readyOrderDetail?community='+communityId+'&startTime='+startTime},
		end: function(){
			clickSS();
		}
	}); 
}
</script>
<%@ include file="../include/bottom.jsp"%>